home *** CD-ROM | disk | FTP | other *** search
/ Aminet 6 / Aminet 6 - June 1995.iso / Aminet / gfx / 3d / irit50src.lha / irit5 / amigalib / putenv.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-02-26  |  229 b   |  18 lines

  1. #include <string.h>
  2. #include <proto/dos.h>
  3.  
  4. int
  5. putenv(char *s)
  6. {
  7.   char *delim;
  8.  
  9.   delim = strchr(s, '=');
  10.   if (!delim) {
  11.     return 1;
  12.   }
  13.   *delim = 0;
  14.   SetVar(s, delim+1, -1, GVF_GLOBAL_ONLY);
  15.   *delim = '=';
  16.   return 0;
  17. }
  18.